
package com.idealighter.game.games.errenniuniu.handler;

import com.google.inject.Inject;

import com.idealighter.game.core.annotation.ReqMsgHandler;
import com.idealighter.game.games.errenniuniu.manager.ErRenNiuNiuMgr;
import com.idealighter.game.games.errenniuniu.message.ReqCallDealerMsg;
import com.idealighter.game.message.core.ReqMessage;
import com.idealighter.game.message.core.ResMessage;
import com.idealighter.game.player.struct.Player;
import com.idealighter.game.server.handler.ReqMessageHandler;

/**
 * .
 *
 */
@ReqMsgHandler(502106)
public class ReqCallDealerHandler implements ReqMessageHandler {
  @Inject
  private ErRenNiuNiuMgr errenniuniuMgr;

  @Override
  public ResMessage action(Player player, ReqMessage message) {
    ReqCallDealerMsg msg = (ReqCallDealerMsg) message;
    errenniuniuMgr.callDealer(player, msg.getCall() == 0 ? false : true);

    return null;
  }
}
